package com.three.storemanage.feign;

import com.three.core.entity.User;
import com.three.core.vo.R;
import com.three.storemanage.config.FeignConfig;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @FileName: UserFeign
 * @Description:
 * @Author: GYX
 * @CreateTime: 2025/3/13 16:47
 * @Version: 1.0.0
 */
@FeignClient(value = "car-wash-system",fallbackFactory = UserFeignFallbackFactory.class, configuration = FeignConfig.class)
public interface UserFeign {
    @GetMapping("/info")
    public R<User> getinfo(@PathVariable HttpServletRequest request);

    @GetMapping("/system/user/getByName")
    public R<User> getByName(@RequestParam String userName);
}
